const { sequelize } = require('../../core/db');
const { Sequelize, Model } = require('sequelize');


// 电影
class Favor extends Model {
    // 业务
    static async like(book_id, uid) {

    }

    static async dislike(book_id, uid) {

    }
}


Favor.init({
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    uid: {
        type: Sequelize.INTEGER,
    },
    book_id: {
        type: Sequelize.INTEGER,
    },
    status: {
        type: Sequelize.INTEGER(2),
    }
}, {
    sequelize,
    tableName: 'book'
})

module.exports = {
    Favor
}